<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<jsp:directive.include file="seguranca/controleDeAcesso.jsp" />

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Minha Biblioteca</title>
</head>
<body>
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>

<script>
$(document).ready(function() {
   $('table tbody tr:odd').attr('style','background-color:#f5f2f2;');
$('table tbody tr:even').attr('style','background-color:#d9d5d5;');});

</script>
	<f:view>
		<h2>
			Biblioteca de
			<h:outputText value="#{usuarioMB.usuario.nome}"></h:outputText>
		</h2>
		<h:form>
			<h:commandLink action="minhaBiblioteca.jsp" >
				<h:outputText value="volta para pagina inicial"></h:outputText>
			</h:commandLink>
		</h:form>
		
		<h:form>
			<h:commandLink action="#{usuarioMB.logout}" >
				<h:outputText value="Efetuar Logout"></h:outputText>
			</h:commandLink>
		</h:form>
		
		<h:form>
		<h:dataTable value="#{usuarioMB.usuarioscadastrados}" var="usuario">
			<h:column>    				
		      <f:facet name="header"><h:outputText value="Nome"></h:outputText></f:facet>    				
		      <h:outputText value="#{usuario.nome}"></h:outputText>
		   </h:column>
		   <h:column>
		      <f:facet name="header"><h:outputText value="Email"></h:outputText></f:facet>
		      <h:outputText value="#{usuario.email}"></h:outputText>		  
		   </h:column>
		 
		</h:dataTable>
		</h:form>
		
	</f:view>
</body>
</html>